<template>
	<view class="topUpDetails">
		<view class="head" >
			<view class="title">
				{{changeType(msg.type)}}(元)
			</view>
			<view class="money font_blod">
				+{{msg.money}}
			</view>
		</view>
		<view class="boxcen">
			<view class="li borderBtm">
				<view class="title">
					充值时间
				</view>
				<view class="content">
					{{msg.time}}
				</view>
			</view>
			<view class="li">
				<view class="title">
					充值方式
				</view>
				<view class="content">
					{{changeType(msg.type)}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				msg: {}
			}
		},
		onLoad(val) {
			console.log(val);
			this.msg = val
		},
		methods: {
			changeType (val) {
				if (val == 1) {
					return '厂家充值'
				} else if (val == 2) {
					return '后台充值'
				} else if (val == 3) {
					return '余额充值补充'
				} else if (val == 4) {
					return '补助金扣除'
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topUpDetails {
		margin: 24rpx 32rpx;

		.head {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			// background: red;
			background: url('https://www.zzzsyh.com/applets/agent/factory/27.png');
			background-size: 100%;
			background-repeat: no-repeat;
			height: 292rpx;

			.title {
				font-size: 32rpx;
				color: #342100;
				line-height: 44rpx;
			}

			.money {
				color: #342100;
				font-size: 72rpx;
				line-height: 100rpx;
				margin-top: 16rpx;
			}
		}

		.boxcen {
			padding: 24rpx 0;
			background: #FFFFFF;
			border-radius: 24rpx;
			margin-top: 24rpx;
			.li {
				height: 96rpx;
				line-height: 96rpx;
				margin: 0 24rpx;
				display: flex;

				.title {
					color: #666666;
					font-size: 28rpx;
					font-weight: 400;
					width: 144rpx;
				}

				.content {
					font-size: 28rpx;
					color: #333333;
					font-weight: 400;
				}
			}
		}
	}

	.borderBtm {
		border-bottom: 1rpx solid #EEEEEE;
	}
</style>
